<template>
    <el-dialog title="提示" :visible.sync="visible" width="660px" :close-on-click-modal='false'
        @close='close'>
        <div class='descriptions'>
            <p>1、批量修改后无法撤销，请谨慎操作</p>
            <p>2、图片、附件不支持批量修改</p>
            <p>3、设置为【只读】的自定义字段不允许批量修改</p>
        </div>
        <batch-form ref='batchForm' @getForm='form => copyForm = form'></batch-form>
        <span slot="footer" class="dialog-footer">
            <el-button size="mini" @click='visible = false'>取 消</el-button>
            <el-button type="primary" size="mini" @click='confirm'>确 定</el-button>
        </span>
    </el-dialog>
</template>

<script>
    import batchForm from '@/components/batchForm'
    export default {
        data() {
            return {
                copyForm:{},
                visible: false
            }
        },
        components:{
            batchForm
        },
        methods:{
            //确定
            confirm(){
                this.$refs.batchForm.isValidate()
                this.$emit('confirmModify',this.copyForm)
            },
            isOpen(val){
                this.visible = val
            },
            close(){
                this.$refs.batchForm.resetForm()
            }
        }
    }
</script>

<style lang="less" scoped>
    .descriptions {
        font-size: 14px;
        color: rgb(0, 0, 0, .85);
    }

    .changeArea {
        margin-top: 20px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        border-radius: 3px;
        background-color: rgb(250, 250, 250);
        padding: 15px 30px 20px 15px;

        /deep/ .el-select {
            width: 100%;
        }

        /deep/ .el-form-item--mini.el-form-item:last-child {
            margin-bottom: 0;
        }

        /deep/ .el-input-number--mini {
            width: 100%;
        }

        /deep/ .el-date-editor.el-input {
            width: 100%;
        }

        /deep/ .el-tag.el-tag--info {
            transition: all 0.2s;
        }
    }

    .dialog-footer{
        width: 100%;
        display: inline-block;
        text-align: center;
        .el-button{
            padding: 7px 35px;
        }
    }
</style>